1. Field of the Invention
The present invention relates in general to a network switch port for storing incoming packets as sequences of cells, and for thereafter queuing cells to be forwarded selectively on either a sequence-by-sequence or cell-by-cell basis.
2. Description of Related Art
A typical network switch for routing data transmissions (packets) between network buses includes a set of input switch ports for receiving packets arriving on the network buses, a set of output switch ports for forwarding packets outward on the network buses, and a switch fabric for routing packets between the input and output switch ports. Each input switch port includes a buffer memory for storing incoming packets until the input port can forward them to an output switch port. Each output switch port may also include a buffer memory for storing packets it receives via the switch fabric until the port can forward them outward on a network bus.
Since many networks transmit packets of variable size, some switch ports organize their buffer memories into a set of memory blocks, with each block being sufficiently large to hold the largest possible packet. However when most packets are much smaller than the maximum size, much of the storage capacity of most memory blocks is wasted. To make more efficient use of buffer memory space, some input switch ports include a “protocol processor” which converts each incoming packet into a sequence of relatively small standard-sized cells. A traffic manager within the switch port stores each cell of the sequence in a separate buffer memory block just large enough to hold the cell. Converting variable sized packets to sequences of uniformly sized cells enables the port's traffic manager to more efficiently use the data storage capacity of the buffer memory because most memory blocks are completely filled with packet data. An input switch port's traffic manager later reads the cells derived from a packet out of the buffer and forwards them onward to an output switch port via the switch fabric. An output switch port's traffic manager receives and stores cell sequences arriving via the switch fabric and later forwards them to another protocol processor. That protocol processor then reassembles the cell sequence into a packet and forwards it outward on a network bus.
When an input or output switch port's traffic manager receives cell sequences, it must be able to determine the beginning and end of each sequence. Accordingly when the input switch port's protocol processor converts an incoming packet into a cell sequence, it adds a “start of packet” (SOP) and “end of packet” EOP bit to each cell of the sequence. It sets the SOP bit true for the first cell of the sequence, sets the EOP bit true for the last cell of the sequence, and sets SOP and EOP bits of all other packets false. The SOP and EOP bits enable the traffic to determine the start and end of each cell sequence it receives. Similarly when the input switch port's traffic manager forwards a cell sequence to an output switch port's traffic manager, the output switch port's traffic manager can check the cells' SOP and EOP bits to determine the sequence start and end.
Some network switches give an input switch port exclusive access to an output switch port while it is sending a cell sequence to an output port to ensures that the output port's traffic manager receives each cell of a sequence without interruption so that it can easily group the cells according to sequence based on the SOP and EOP bits included in the cells. However when an input switch port has exclusive access to an output switch port, all other input switch ports are prevented from forwarding cells to that output port until the input switch port having exclusive access is finished forwarding cells to the output switch port. Since input switch ports typically queue packets for departure from their buffer memories according to cell sequences and/or time of arrival, an input switch port that is ready to send its “head of line” cell sequence to an output switch port currently being accessed by another input switch port can be blocked from forwarding any cells from its departure queue until it obtains access to the output switch port that is to receive the cell sequence at the head of the departure queue. Thus, for example, while one input switch port is sending a particularly long cell sequence to an output switch port, other input switch ports having only short sequences destined for that output port could be blocked from forwarding any cells from their departure queues to any other output port for a relatively long time.
One way some network switches reduce such “head of line blocking” is to require input switch ports to compete with one another for access to the same output switch port on a cell-by- cell basis. Since in such systems cell sequences derived from different packets can arrive at the switch port in an interleaved fashion, the traffic manager in each output switch port must be able to sort the sequences out. For example, the protocol processor in each input switch port may insert additional data into each cell to identify the sequence to which the cell belongs. In some networks each packet includes a flow identification number (FIN) that is unique to the packet's combination of source and destination switch port. An input switch port's protocol processor can include the packet's FIN in each cell of the sequence derived from the packet so that an output port that later receives interleaved sequences can then sort them out according to FIN.
Whether a traffic manager queues cell sequences for departure on a cell-by-cell or sequence-by-sequence basis depends on the whether the devices that are to receive the cells are able to sort out interleaved sequences. Input switch ports generally, though not always, queue outgoing traffic on a cell-by-cell basis whereas output switch ports generally, though not always, queue outgoing traffic on a sequence-by-sequence basis. What is needed is a traffic manager suitable for use in either an input or output switch port of a network switch that can be dynamically configured to queue cell sequences for departure on either a cell-by-cell basis or a sequence-by-sequence basis.